interface SingletonAccess {
    static Singleton getInstance() {
        return null;//暂时返回null，实际返回值由实现类决定
    }
}//定义接口

class Singleton implements SingletonAccess {
    private static final Singleton Instance = new Singleton();
    private Singleton(){}
    public static Singleton getInstance(){
        System.out.println("Line2");
        return Instance;
    }
}
public class Homework_5_singleton {
    public static void main(String[] args) {
        SingletonAccess accessor = Singleton.getInstance();//通过接口接受的类的对象
        Singleton singleton = Singleton.getInstance();//类的对象
    }
}
